package org.thread.test04.demo04;

/**
 *
 *  @author ZJL
 *  @date 2025-03-11
 */public class MyThread extends Thread {
     private String threadName;
     public MyThread() {

     }
     public MyThread(String threadName) {
         this.threadName = threadName;
     }
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            // 获取中断标记，false 表示未中断
            boolean flag = Thread.currentThread().isInterrupted();
            System.out.println("中断标记："+flag);
        }
    }
}
